Skip to main content

ARDK for Android/com.nianticlabs.ardk/ARDKResult

ARDKResult

sealed class ARDKResult<out TData, out TError : ErrorCodeProvider>

ResultDeprecated wrapper for ARDK operations that can succeed or fail.

ARDKResult is a Kotlin sealed class designed to provide a type-safe abstraction over the return values of low-level C APIs. Instead of directly handling raw integer status codes from the C layer, Kotlin callers receive structured results as either Success or Error.

Parameters​

androidJvm

TDataThe type of the success value

Samples​

Inheritors​

Success
Error

Types​

NameSummary
Error[androidJvm]
data class Error<out TData, out TError : ErrorCodeProvider>(val code: TError) : ARDKResult<TData, TError>
Represents a failed outcome, where the requested data was not available.
Success[androidJvm]
data class Success<out TData, out TError : ErrorCodeProvider>(val value: TData) : ARDKResult<TData, TError>
Represents a successful outcome, where the requested data was available.